package com.park.dailytool.data.dao.jpa.local;

import com.park.dailytool.data.pojo.model.local.EveryDayAmount;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * @author huangding
 * @description
 * @date 2019/1/23 13:16
 */
public interface EveryDayAmountJpaDao extends JpaRepository<EveryDayAmount, Integer> {

    EveryDayAmount findByDate(String date);

    @Query(value = "select * from every_day_amount where `date` >= (?1) and `date` <=(?2)", nativeQuery = true)
    List<EveryDayAmount> findByStartDateOrEndDate(String startDate, String endDate);

}
